package net.lzzy.practices.repositonies;

import net.lzzy.practices.entities.Applicant;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.UUID;

/**
 * @author m
 */
public interface ApplicantRepository extends JpaRepository<Applicant, UUID> {

    List<Applicant> findApplicantsByStudentIdEqualsOrderByApplyTimeDesc(UUID id);

    List<Applicant> findApplicantsByStudentIdEqualsAndStatusEqualsOrderByApplyTimeDesc(UUID id, int status);

    List<Applicant> findApplicantsByCourseIdEqualsAndStatusEqualsOrderByApplyTimeDesc(UUID id,int status);

    Applicant findApplicantsByCourseIdEqualsAndStudentIdEquals(UUID courseId,UUID studentId);
//    Applicant findApplicantsByCourseIdAndStudentId(UUID courseId,UUID studentId);
}
